<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="https://cdn.bootcdn.net/ajax/libs/vue/2.6.11/vue.min.js"></script>
</head>
<body>

    <div id="app">
        <input type="text" v-model="name" name="" id="" value="">
        <h1>{{ name }}</h1>
        <p v-show="age>=18">成年</p>
        <p v-show="age<18">未成年</p>
    </div>

    <script>

        var app = new Vue({
            // el : 指定vue对象作用于那个元素上
            el: '#app',
            // data : 定义数据
            data: {
                name:'张三',
                age: 8
            }
        })

    </script>
    
</body>
</html>